using System;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ARStructTypeInfo(Name = "ARCOMValueStruct", NumberOfMembers = 4u), ClassInterface, Guid("f32cdc08-3bc1-4d81-b305-449e4cc11e7c"), ProgId("BMC.ARSystem.COMValue")]
	public class COMValue
	{
		[ARStructMemTypeInfo(Name = "valueIId", Offset = 0u)]
		private string _valueIId;
		[ARStructMemTypeInfo(Name = "transId", Offset = 1u)]
		private uint _transId;
		[ARStructMemTypeInfo(Name = "valueType", Offset = 2u)]
		private uint _valueType;
		private uint _fieldId;
		private string _value;
		public string ValueIId
		{
			get
			{
				return this._valueIId;
			}
			set
			{
				this._valueIId = value;
			}
		}
		public uint TransId
		{
			get
			{
				return this._transId;
			}
			set
			{
				this._transId = value;
			}
		}
		public uint ValueType
		{
			get
			{
				return this._valueType;
			}
			set
			{
				this._valueType = value;
			}
		}
		public uint FieldId
		{
			get
			{
				return this._fieldId;
			}
			set
			{
				this._fieldId = value;
			}
		}
		public string Value
		{
			get
			{
				return this._value;
			}
			set
			{
				this._value = value;
			}
		}
		public COMValue()
		{
		}
		internal COMValue(object[] rawData, Server server)
		{
			int[] indexSpec = new int[1];
			this._valueIId = (string)Util.GetAt(rawData, indexSpec);
			this._transId = Convert.ToUInt32(Util.GetAt(rawData, new int[]
			{
				1
			}));
			this._valueType = Convert.ToUInt32(Util.GetAt(rawData, new int[]
			{
				2
			}));
			switch (this._valueType)
			{
			case 1u:
				this._fieldId = Convert.ToUInt32(Util.GetAt(rawData, new int[]
				{
					3
				}));
				return;
			case 2u:
				this._value = Util.ConvertFromARValue((object[])Util.GetAt(rawData, new int[]
				{
					3
				}), false, false).ToString();
				return;
			default:
				return;
			}
		}
		internal static COMValue createInstance(object[] rawData, Server server)
		{
			return new COMValue(rawData, server);
		}
	}
}
